package com.csi.okr.mobile.common.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * 
 */
@Embeddable
public class TOkrEmplOrgId implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String orgCode;
	private String emplCode;

	public TOkrEmplOrgId() {
	}

	public TOkrEmplOrgId(String orgCode, String emplCode) {
		this.orgCode = orgCode;
		this.emplCode = emplCode;
	}

	@Column(name = "ORG_CODE", nullable = false, length = 32)
	public String getOrgCode() {
		return this.orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	@Column(name = "EMPL_CODE", nullable = false, length = 16)
	public String getEmplCode() {
		return this.emplCode;
	}

	public void setEmplCode(String emplCode) {
		this.emplCode = emplCode;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TOkrEmplOrgId))
			return false;
		TOkrEmplOrgId castOther = (TOkrEmplOrgId) other;

		return ((this.getOrgCode() == castOther.getOrgCode()) || (this.getOrgCode() != null
				&& castOther.getOrgCode() != null && this.getOrgCode().equals(castOther.getOrgCode())))
				&& ((this.getEmplCode() == castOther.getEmplCode()) || (this.getEmplCode() != null
						&& castOther.getEmplCode() != null && this.getEmplCode().equals(castOther.getEmplCode())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getOrgCode() == null ? 0 : this.getOrgCode().hashCode());
		result = 37 * result + (getEmplCode() == null ? 0 : this.getEmplCode().hashCode());
		return result;
	}

}
